<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
		<title>宝宝信息</title>
		<script type="text/javascript" src="js/init.js"></script>
		<link rel="stylesheet" type="text/css" href="css/common.css">
		<link rel="stylesheet" type="text/css" href="css/login.css">
		<link rel="stylesheet" type="text/css" href="css/sui/sm.min.css" />
	</head>

	<body>
		<div class="fillForm">
			<div class="fillFormheader">
				<h1>填定基本资料</h1>
			</div>
			<div class="fillForm-content">
				<div class="input-row">
					<input class="j-truename" type="text" placeholder="真实姓名" />
				</div>
				<div class="input-row">
					<input class="j-phone" type="text" placeholder="手机电话" />
				</div>
				<div class="input-row">
					<input class="j-code" type="text" placeholder="身份证号码" />
				</div>
				<div class="input-row">
					<input class="j-mateName" type="text" placeholder="配偶姓名" />
				</div>
				<div class="input-row">
					<input class="j-matePhone" type="text" placeholder="联系电话" />
				</div>
				<div class="input-row">
					<input class="j-mateCode" type="text" placeholder="身份证号码（非必填）" />
				</div>
				<div class=" city-picker">
					<input class="areaSelect j-areaSelect" id="city-picker" type="text" placeholder="所在地区" />
				</div>
				<div class="input-row">
					<input class="j-detailArea" type="text" placeholder="详细地址" />
				</div>
			</div>

			<div class="btn j-submit">
				<button>
			下一步
		</button>
			</div>
		</div>
		<script src="js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="js/sui/sm.js"></script>
		<script type="text/javascript" src="js/sui/sm-extend.js"></script>
		<script src="js/sui/city-picker.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				$("#city-picker").cityPicker({
					value: ['']
					//value: ['四川', '内江', '东兴区']
				});

				$(".j-submit").click(function() {
					var tureName = $('.j-truename').val();
					var phone = $('.j-phone').val();
					var code = $('.j-code').val();
					var mateName = $('.j-mateName').val();
					var matePhone = $('.j-matePhone').val();
					if($.trim(tureName).length == 0) {
						$.toast("名字不能为空");
					} else if($.trim(phone).length == 0) {
						$.toast("手机号码不能为空");
					} else if(!/(^1[3|4|5|7|8]\d{9}$)/.test(phone)) {
						$.toast("请输入正确的手机号码");
					} else if($.trim(code).length == 0) {
						$.toast("身份证号不能为空");
					} else if(!/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(code)) {
						$.toast("请输入正确的身份证号码");
					} else if($.trim(mateName).length == 0) {
						$.toast("配偶名字不能为空");
					} else if($.trim(matePhone).length == 0) {
						$.toast("配偶手机号码不能为空");
					} else if(!/(^1[3|4|5|7|8]\d{9}$)/.test(matePhone)) {
						$.toast("请输入正确的配偶手机号码");
					}

				})
			})
		</script>
	</body>

</html>